package com.lagou.myblog.service.impl;

import com.lagou.myblog.dao.ArticleRepository;
import com.lagou.myblog.pojo.Article;
import com.lagou.myblog.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;

@Component
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleRepository articleRepository;

    @Override
    public Page<Article> findArticleByPageInfo(Pageable pageable) {
        return articleRepository.findAll(pageable);
    }
}
